#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int n = 0;
	int i = 0; int j = 0;
	scanf("%d", &n);
	int arr[15][15];
	for (i = 0; i < n; i++)
	{
		for (j = 0; j < n; j++)
		{
			scanf("%d", &arr[i][j]);
		}
	}
	for (i = 0; i < n; i++)
	{
		int count = 0;
		for (j = 0; j < n; j++)
		{
			if (count == 0)
			{
				printf("%d", arr[j][i]);

			}
			else
			{
				printf(" %d", arr[j][i]);
			}
			count++;
		}
		printf("\n");
	}
	return 0;
}